# coding: utf-8
from sqlalchemy import Column, DateTime, Integer, String
from sqlalchemy.schema import FetchedValue
from application import db



class Collection(db.Model):
    __tablename__ = 'collection'

    id = db.Column(db.Integer, primary_key=True)
    collection_id = db.Column(db.Integer, nullable=False, info='??ID')
    user_id = db.Column(db.Integer, info='??????????????')
    name = db.Column(db.String(128), nullable=False, info='????')
    detail = db.Column(db.String(1024), info='????')
    update_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue(), info='????')
    created_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue(), info='????')
